#print("https://segmentfault.com/q/1010000000665612".find("//"))
import re

url = "https://segmentfault.com/q/1010000000665612"
url = url[url.find("//")+2:]
if("/" in url):
    url = url[:url.find("/")]

print(url)